<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
</table>
{ext->class_function class="payment" func="get_invoice" assign="invoices"}
{ext->countArray array=$invoices assign="invoices_count"}
{if $invoices_count > 0}
	<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
		<tr>		
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="70">{t t='Žymėjimas'}</td>	
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="70">{t t='Sąskaitos ID'}</td>		
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="220">{t t='Sąskaitos pavadinimas'}</td>		
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="110">{t t='Data'}</td>		
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="80">{t t='Bank gateway'}</td>						
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="100">{t t='Sąskaitos šaltinis'}</td>						
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="80">{t t='Sąskaitos suma'}</td>						
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="90">{t t='Banko atsakymas'}</td>			
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE">{t t='Būsena'}</td>			
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; width:28px;"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="1" bgcolor="#D6DBDE"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
	</table>
	{foreach from=$invoices item="invoice"}
	<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td height="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>

	<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
		<tr>		
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="70"><input name="ids[{$invoice.id}]" value="{$invoice.id}" type="checkbox"></td>	
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="70">{$invoice.id}</td>		
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="220">{$invoice.name}</td>		
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="110">{$invoice.date}</td>		
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="80">{$invoice.gateway}</td>						
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="100">
			{explode string=$invoice.from separator="||" assign="from"}
			{if $from.0 == 'shop_cart'}
				<a href="index.php?admin=1&body=admin/modules/shop_cart/index.html&module=shop_cart&order_id={$from.1}" target="_self">{t t=$from.0}</a>
			{else}
				{t t=$from.0}
			{/if}
			</td>						
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="80">{$invoice.amount}</td>						
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="90">{t t=$invoice.bank_status}</td>
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE">
				<select name='inv_status' style="width:93px;" onChange="window.document.forms['child_list']['invoice'].value={$invoice.id}; window.document.forms['child_list']['status'].value=this.value; window.document.forms['child_list'].submit();">
					<option value='wait'{if $invoice.status == 'wait'} selected{/if}>{t t='payment_wait'}</option>
					<option value='pay'{if $invoice.status == 'pay'} selected{/if}>{t t='payment_pay'}</option>
					<option value='notpay'{if $invoice.status == 'notpay'} selected{/if}>{t t='payment_notpay'}</option>
				</select>
			</td>			
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; width:28px;">{if $invoice.ip}<img alt="{$invoice.ip}" src="_tvs_system_core_/design/img/admin/ip.gif">{/if}</td>
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td height="1" bgcolor="#D6DBDE"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>
	{/foreach}
{else}
	<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td height="50" bgcolor="#FFFFFF" align="center" style="padding:15px">{t t='Nėra nei vienos sąskaitos.'}</td>		
		</tr>
	</table>
{/if}

